package com.sysmanage.etl.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ETL_PROPERTY_COLUMN")
public class ETL_Property_Column implements Serializable {
	private static final long serialVersionUID = -3880135561594828160L;
	public static final Integer PRIMARY_GENERATE = 0;
	public static final Integer PRIMARY_STRATEGY = 1;

	private Integer pc_id;
	private String pc_eq = "=";
	private Boolean isForeignKey;
	private Boolean isPrimaryKey;
	private Integer primaryKey;
	private Integer pc_index;
	private String otherValue;
	private ETL_Property property;
	private ETL_Column column;
	private ETL_Rule rule;
	private Boolean isRepeat;

	@Id
	@GeneratedValue
	@Column(name = "PC_ID")
	public Integer getPc_id() {
		return pc_id;
	}

	public void setPc_id(Integer pc_id) {
		this.pc_id = pc_id;
	}

	@ManyToOne
	@JoinColumn(name = "PROPERTY_ID")
	public ETL_Property getProperty() {
		return property;
	}

	public void setProperty(ETL_Property property) {
		this.property = property;
	}

	@ManyToOne
	@JoinColumn(name = "COLUMN_ID")
	public ETL_Column getColumn() {
		return column;
	}

	public void setColumn(ETL_Column column) {
		this.column = column;
	}

	@ManyToOne
	@JoinColumn(name = "RULE_ID")
	public ETL_Rule getRule() {
		return rule;
	}

	public void setRule(ETL_Rule rule) {
		this.rule = rule;
	}

	@Column(name = "ISFOREIGNKEY")
	public Boolean getIsForeignKey() {
		return isForeignKey;
	}

	public void setIsForeignKey(Boolean isForeignKey) {
		this.isForeignKey = isForeignKey;
	}

	@Column(name = "ISREPEAT")
	public Boolean getIsRepeat() {
		return isRepeat;
	}

	public void setIsRepeat(Boolean isRepeat) {
		this.isRepeat = isRepeat;
	}

	@Column(name = "PC_EQ")
	public String getPc_eq() {
		return pc_eq;
	}

	public void setPc_eq(String pc_eq) {
		this.pc_eq = pc_eq;
	}

	@Column(name = "PC_INDEX")
	public Integer getPc_index() {
		return pc_index;
	}

	public void setPc_index(Integer pc_index) {
		this.pc_index = pc_index;
	}

	@Column(name = "ISPRIMARYKEY")
	public Boolean getIsPrimaryKey() {
		return isPrimaryKey;
	}

	public void setIsPrimaryKey(Boolean isPrimaryKey) {
		this.isPrimaryKey = isPrimaryKey;
	}

	@Column(name = "PRIMARYKEY")
	public Integer getPrimaryKey() {
		return primaryKey;
	}

	public void setPrimaryKey(Integer primaryKey) {
		this.primaryKey = primaryKey;
	}

	@Column(name = "OTHERVALUE")
	public String getOtherValue() {
		return otherValue;
	}

	public void setOtherValue(String otherValue) {
		this.otherValue = otherValue;
	}

}
